This invention relates to transmission of information between two or more digital devices. More particularly, this invention relates to a method and apparatus capable of two-way data transmission and translation between a device communicating according to an Asychronous Point-to-Point Protocol (Asynchronous PPP) and a device communicating according to a Synchronous Point-to-Point Protocol (Synchronous PPP).
For many decades, digital computer users have interacted with centralized computing resource from remote locations. Long before the advent of the personal computer (PC), remote users communicated with large central mainframe computers by using a remote dumb terminal connected to a modem communicating over standard public telephone lines. A modem is a device that accepts binary encoded data (generally represented as a square wave with two voltage levels, -12 and +12 volts) and translates that data into signals that can be easily transmitted over the public phone network. Generally, the modem translates the binary values into two or more audible frequencies by modulating an audible carrier frequency signal. This modulated carrier is then transmitted over the phone lines, and a modem on the other end of the line demodulates the carrier signal to recover the binary data and transmits that data to the central computer. Thus the name "modem," which is a contracted combination of "modulate" and "demodulate." In the art, generalized names have been used to refer to the modem and dumb terminal, with the modem or other equipment the provides communication services referred to as a DCE (for Data Communicating Equipment, formerly Data Circuit-terminating Equipment) and the dumb terminal or other equipment that receives the digital data (such as a PC or digital phone) referred to as a DTE (for Data Terminal Equipment).
As computing has evolved from large mainframes connected to dumb terminals to large networks of PCs in an office sharing resources and data via a local area network (LAN), the modem has remained. Modems today typically connect a home or remote office PC to a central LAN. However, modem communication has increasingly not kept up with the need for modern PC users to receive complex digital, digitized audio, and digitized video at home with the same level of service and speed that they are used to receiving when working in an office directly connected to the office LAN. The fastest commercially available modems today can transfer data at a rate of about 28.8 Kilo bits per second (Kbps). While this is a vast improvement over the data rates of 300 bps common just 15 years ago, it is still substantially slower than the 1 to 10 to 100 Mega bps (Mbps) possible for communications in an interoffice LAN.
One limitation to the speed with which remote users can communicate with a central computer or LAN is use of standard public phone lines. Because of the electrical and transmission line characteristics of the public phone network, binary data cannot be directly transmitted as simply two voltage levels. The data must first be modulated onto an audible carrier signal. This limitation is being increasingly removed as public phone companies are providing a new separate service to home and business users called ISDN (for Integrated Services Digital Network). ISDN lines may look like and enter the home as an ordinary telephone line, but in fact connect to a separate ISDN service. This service allows for direct transmission of digital data throughout the ISDN network without the need for modulation onto an audible frequency. Standard ISDN lines are now available to many home users, both in the United States and in other parts of the world. In the U.S., ISDN lines are available to home users starting at about $30 per month. The least expensive ISDN service can transmit data at a rate of 64 Kbps.
However, commercially available PC's on the market today cannot communicate directly with an ISDN line. Therefore, a DCE device is required for communicating data to and from the PC (or other DTE) and then transmitting and receiving data over the ISDN according to the ISDN's protocol. A number of such DCE devices have become recently commercially available. While these devices do not modulate a carrier frequency as do standard analog modems, these new ISDN DCE devices are often referred to as "ISDN modems" or "digital modems." In order to avoid confusion, the type of DCE device provided by the present invention is referred to herein as a "converter" because in addition to providing an ISDN connection to a PC, it converts between two different types of data transmission, namely asynchronous and synchronous transmissions, as described below. A full understanding of the present invention requires some knowledge of packet-based data transmission as well as synchronous versus asynchronous data transmission and these topics are discussed below.
Point-to-Point Packet Protocols For Remote Users
Before the advent of the PC, communications between remote DTEs and central computers operated on generally a character-by-character transmission. Since the remote terminals were dumb, i.e. generally incapable of independently performing any computing tasks for the user, there had to be communication between the DTE and the central computer each time the user wished any computing action to be taken, and as a result, dumb terminals typically transmitted characters of data to the central computer as each character was typed by the user. PCs have dramatically changed this paradigm. When using a PC, most computing operations and application programs execute locally on the PC, with the remote computing resource contacted only intermittently, perhaps just to load or receive files or other data to or from the PC.
In order to facilitate intermittent communications between PC's and a central computing resource (such as a file server) within a LAN, a number of packet-based communications protocols have been adopted. One set of such protocols in referred to as TCP/IP (for Transmission Control Protocol/Internet Protocol). The TCP/IP protocols are defined in a series of documents released by the Internet Engineering Task Force. The documents are referred to as RFC's (for Request For Comment). These documents are available over the Internet at URL http://www.cis.ohio-state.edu:80/hypertext/information/rfc.html or via FTP at ds.internic.net. The protocols specify a number of conventions for use in packet communications, such as how data in the packets is organized, the packet headers, packet addressing, etc. Using these protocols, a PC sends and receives data from a centralized computing resource in packets, only when needed, and generally in response to a specific request from the user.
Within the network itself, packet communications under TCP/IP are generally multipoint communications, that is, multiple receivers are connected to a network line and a transmitter sends out packets on the network and any number of receivers or all receivers listen to the packet, but only those receivers to whom the address in the packet header indicates are addressed to actually examine the data in the packet. The packet must contain the address of the sender and the intended receiver.
An additional set of protocols has been developed for sending and receiving TCP/IP packets at a remote PC over a phone line. These protocols are referred to as PPP (for Point-to-Point Protocols, the predecessors to these PPP protocols where referred to as SLIP for Serial Line Internet Protocol). The PPP protocols are described in RFC1661, RFC1662 and RFC1663, available from the IETF. The name PPP refers to the fact that this protocol is distinct from multipoint protocols in part because it is not necessary for every packet transmitted over the PPP connection to contain a source or an initial destination address. This is true because the PPP connection is between just two devices; any packet transmitted by one device must necessarily be received by the other device.
The protocols just discussed all fit into a layered networking standard. In a layered standard, various necessary networking tasks are broken down and organized into a number of layers, based on the level of abstraction at which the data is being considered by those tasks. Different protocols may operate at different layers. For example, the lowest layer is generally referred to as the "physical layer" and defines the physical means by which data signals are transmitted. The physical layer may incorporate one of various protocols for transmission via wires, optical fiber, radio waves, or the telephone system. As part of the layered standard, protocols operating at one layer must communicate with a variety of different possible protocols at the next lower and next higher layer. The layers are somewhat independent in that regardless of which physical layer protocol is used, at the next highest layer, often called the "data link layer," the same packetizing and addressing protocol may be used. The PPP documents referred to above discuss data transmissions at three layers: the physical layer, the data link layer, and the network layer and specify protocols that primarily operate at the data link layer.
Asynchronous and Synchronous Communications at the Physical Layer
At the physical layer, an important characteristic in the transmission of data over a wire is whether the communications are bit-synchronous or bit-asynchronous. Standard modems transmit data asynchronously. In asynchronous transmission, bits of data are transmitted in very short groups, generally 8-bit bytes. Each byte of data is preceded by an additional START BIT and is followed by at least one STOP BIT. The term asynchronous is used because there is no shared clock between the transmitter and the receiver. One limitation to the speed with which standard modems may transmit data is the use of asynchronous communications. Each 8-bits of data transmitted require at least 2 additional non-data bits to be transmitted. FIG. 1 illustrates an example of transmission of 2 bytes of data 10a (01111110), and 10b (11100000) using an Asynchronous transmission. Each byte of data is preceded by a start bit 12a and followed by a stop bit 12b.
ISDN lines and ISDN modems transmit data synchronously. In synchronous transmission, bits of data are transmitted continuously in long groups. There are no START BITS or STOP BITS and once data transmission commences, as far as the physical layer is concerned, it can continue indefinitely. The term synchronous is used because there is a shared clock between the transmitter and the receiver. The shared clock is generally carried by and recovered from the data stream itself. This is possible because each bit in a synchronous data stream is encoded as a voltage transition from either high to low (a "0" bit) or from low to high (a "1" bit). There is therefore a guaranteed transition during every clock cycle, and from these transitions, a clock at the receiver can be continuously synchronized with the data stream using a known circuit such as a phase lock loop. Contrast this with asynchronous transmissions, where single voltage levels are used to encode logical 0's and 1's. In asynchronous transmission, during transmission of a byte consisting of eight 1's such as 11111111 there will be no voltage transitions and therefore no way for a receiver to recover a clock from the data stream. FIG. 2 illustrates an example of transmission of 3 bytes of data 10a, 10b, and 10c using a synchronous transmission protocol. Byte 10c is only partially illustrated.
Asynchronous communication has proven to be the most widely adopted method of communication thus far over the public telephone lines using a modem. This is partly due to the different amounts of delay and distortion that may be experienced in an audible signal through a public telephone network. An asynchronous transmission is less sensitive to this distortion than a synchronous transmission. Essentially all PCs sold today include an asynchronous communications port as standard equipment. This port is generally controlled by a standard IC known as a UART (Universal Asynchronous Receiver/Transmitter). A number of network software products include software drivers for transmitting data over the asynchronous port. In order for a PC equipped with an asynchronous port to communicate with a synchronous transmitter such as an ISDN line, the PC must be provided with an apparatus for translating between asynchronous bit streams and synchronous bit streams. According to applicant's invention, a PC is provided with such an apparatus which translates bits at the physical layer between asynchronous and synchronous as well as providing higher-layer translation as discussed below.
Asynchronous Byte Stuffing and Synchronous Bit Stuffing
Among the higher-layer issues that a converter such as applicant's invention must handle is translating the manner in which control codes are transmitted in asynchronous and synchronous communications. Control codes are codes used by transmitter to signal certain conditions to the receiver. These conditions might include the start of transmission of a block of data, the end of transmission of a block of data, a signal that the transmitter is ready to send, a signal that one of the data devices is ready to receive, etc. According to the most commonly used protocol asynchronous communication can have up to 32 different control codes; codes that are very commonly used are XON (00010001) and XOFF (00010011), which stand for transmission-on and transmission-off. In both asynchronous and synchronous communication, an immediate problem arises with the use of control codes. Control codes are essentially a particular string of bits defined to be a control code. However, users transmitting data generally must have available to them the ability to transmit any of the 256 possible different bytes of data, including bytes that are identical to the control codes. The protocol, therefore, must provide a method for distinguishing in a data stream when a particular bit pattern is simple part of the data versus when it is a control code. In asynchronous communications, that method is referred to as "byte stuffing;" in synchronous communication, that method is referred to as "bit stuffing."
According to the most common asynchronous communication protocols, "byte stuffing" occurs as follows. A particular asynchronous protocol can define any of the first 32 possible 8-bit bytes (00000000 through 00011111) to be control codes. No bytes need be defined as control codes, but if at least one byte is defined as a control code, than an additional byte, known as the escape character (ESC), must also be defined as a control code. Those bytes that are control codes may be determined at the outset by the protocol or may be negotiated between the receiver and transmitter before data transmission begins. After the control codes are determined, an asynchronous transmitter may use the control codes to establish a communication session. Once data transmission begins, the asynchronous transmitter monitors each byte of the data stream before it is transmitted and compares that data byte to the defined control codes. When the transmitter detects a data byte that is identical to a control code, the transmitter inserts or "stuffs" an additional byte, the ESC character, just before the data byte. In the art, this action is known as "escaping" the data byte. When the receiver receives this ESC character, it is then aware that the next byte will be a data byte, even though it has the same value as a control code. The receiver discards the first received ESC, and receives the next byte as a data character. The ESC character is also defined as a control character; therefore, if the ESC character appears in the data stream, it too is "escaped" and the data is transmitted as ESC ESC. This method is known as a "byte stuffing" procedure because the ESC byte is stuffed into the data stream before each data byte that is identical to a defined control character. One ESC byte must be transmitted along with the data stream for every data byte that happens to be identical to a control code, thereby slowing down the overall data transmission rate.
According to the most common synchronous communication protocols, "bit stuffing" occurs as follows. Most synchronous protocols define only one control code, known as the flag byte. This code generally has the value 01111110. The flag byte both begins and terminates all transmissions, as whenever the flag byte is received during data transmission, the receiver assumes that the transmission has ended. It is therefore necessary that actual data stream sent to the receiver never includes an unintentional flag byte. This is accomplished using a bit stuffing procedure as follows. Whenever the transmitter detects a string of five 1 bits in a row in a data stream to be transmitted, the transmitter inserts a single 0 into the transmitted data stream just after the string of five 1's. This 0 is inserted whether the bit following the five 1's is a 0 or a 1. In this way, the transmitter guarantees that any string of six 1's seen by the receiver will be part of a flag byte. The 0 is inserted after every five 1's regardless of the value of the sixth bit to make it possible to restore the original data at the receiver. When the receiver receives the data stream, it detects all strings of five 1's, at that point the receiver examines the sixth bit. If the bit is a 0, it is discarded by the receiver and the receiver continues to receive data bits; if the sixth bit is a 1, then the received knows that it has received a valid flag byte.
Asynchronous PPP and Synchronous PPP
A final issue that a converter such as applicants' invention must handle is capturing and translating data packets that are sent at still higher layers of the network standard. The previously discussed PPP protocols that are described in RFC1661, RFC1662 and RFC1663 in fact define two separate but related protocols, one for Asynchronous PPP and another for Synchronous PPP. These protocols differ, among other things, in their exchange of Link Control Protocol (LAP) packets, which are data packets that are used at the link control layer to format certain transmission parameters of the link. In Asynchronous PPP, LCPs are is used to negotiate and configure the Asynchronous Control Character Map (ACCM). The ACCM is a 32 bit flag field that defines which of the 32 possible control characters should be escaped accordingly to the encoding rules defined in RFC1662. A "1" in a particular location in the ACCM flag field indicates that the corresponding control code must be escaped. A "0" in a particular location in the ACCM flag field indicates that the corresponding control code need not be escaped. ACCM can be negotiated using the parameter negotiation protocols defined in RFC1661 and RFC1662. The default ACCM for Asynchronous PPP is FFFFFFFF hex indicating that all control characters (ASCII 0-1F hex) are escaped; the default ACCM for Synchronous PPP is 0 indicating that no control characters are escaped. While the Synchronous PPP protocol allows a transmitter to specify an ACCM, in fact at present no Synchronous devices known to the inventors actually use an ACCM or escape any control characters. A converter from Asynchronous PPP to Synchronous PPP must provide an effective means for translating between the two protocols at the data link layer.
From the above it may be seen that what is needed is an Asynchronous to Synchronous Converter that provides transparent and two-way translation between an Asynchronous PPP connection and a Synchronous PPP connection at both the physical and higher layers of the network standard.